<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_menus', function (Blueprint $table) {
            $table->increments('id');
            $table->char('title', 50)->default('')->commtent('菜单名称');
            $table->char('icon', 100)->default('')->commtent('菜单图标');
            $table->string('url', 255)->default('')->commtent('跳转路径');
            $table->integer('pid')->nullable()->comment('菜单父节点id');
            $table->integer('lft')->default('')->comment('左边节点');
            $table->integer('rgt')->default('')->comment('右边节点');
            $table->integer('depth')->nullable()->comment('层级');
            $table->integer('sort')->nullable()->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('admin_menus');
    }
}
